export default {
    setData(context){
        const totalPrice = Number(localStorage.getItem('totalPrice') || '0'),
              totalMount = Number(localStorage.getItem('totalMount') || '0');
        const cartData = JSON.parse(localStorage.getItem('cartData') || '[]');
        // console.log(cartData);
        context.commit('SET',{
            totalPrice,
            totalMount,
            cartData
        })
        
    },
    cart(context,value){
        context.commit('CART',value)
    },
    choose(context,value) {
        context.commit('CHOOSE',value)
    },
    setCart(context,value) {
        context.commit('SET_CART',value)
    },
    del(context,value) {
        context.commit('DEL',value)
    },
}